<template>
  <view class="content">
  		<!-- 	<image class="logo" src="/static/logo.png"></image> -->
  		<view class="text-area">
  			<text class="title">{{ title }}</text>
  		</view>
  		<view class="uni-list">
  			<view class="uni-list-cell" hover-class="uni-list-cell-hover" v-for="(item, index) in userList" :key="index">
  				<!-- 	<view class="uni-list-cell-navigate uni-navigate-right">{{ item.Title }}</view> -->
  
  				<button type="default" @click="getDetail(item.Id)">{{ item.Title }}</button>
  			</view>
  			<uni-pagination @change="handlePage" show-icon="true" :total="postCount" :current="pageNum" :pageSize="pageSize"></uni-pagination>
  		</view>
  	</view>
</template>

<script>
	//import common from '@/utils/common.js';
	import { listUser } from "@/api/system/user"
	import uniPagination from '@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue'
	export default {
	components: { uniPagination },
	data() {
	  return {
		title: '用户列表',
		postCount: 0,
		pageSize: 10,
		pageNum: 1,
		userList: [],
		loading: true
	  };
	},
	onLoad() {
	  this.getUser(this.pageNum)
	},
	methods: {
	  getUser() {
		listUser(pageNum).then(response => {
			this.userList = response.data.rows
			this.loading = false
		})
	  }
	}
	}
</script>

<style lang="scss">
  page {
    background-color: #ffffff;
  }
</style>
